package com.necsv;

import com.necsv.Mylog.Mylog;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;

public class BroadCastReceiverReferrer extends BroadcastReceiver{

	private static final String TAG = "BroadCastReceiverReferrer";
	private static final String KEY_REFERRER = "referrer";
	private String sReferrer;

	@Override
	public void onReceive(Context  context, Intent intent) {
		// TODO Auto-generated method stub
		try {
			Bundle extras = intent.getExtras();
			if(extras != null)
			{
				sReferrer = extras.getString(KEY_REFERRER);
				Log.v(TAG, "get REFERRER: " + sReferrer);
				Mylog.Toat(context, "REFERRER:" + sReferrer);
			}
		} catch (Exception e) {
			// TODO: handle exception
			Log.v(TAG, "Err get Referrer");
		}
	}
	
}
